php forum
php mysql forum
php mysql smarty
 
Page 1 of 9 1 2 3 4 5 6 7 8 9 >
Topic Options
#146988 - 09/06/01 06:05 PM [6.1x] UBB File Compression PB 2
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
What :: UBB Compression with cgi_buffer.pm

Version :: 6.1.0 PB 2

Info :: As promised in the recent U-zine article. Now you can dramatically reduce bandwidth and download times with an easy to use perl module.

Demo :: http://www.ubbdev.com/ubbcgi/ultimatebb.cgi

Credits :: WiLD for pointing it out to us smile

Files :: http://ubbdev.com/hacks/6.1/Compress.zip

How To ::


Open ultimatebb.cgi, uncomment use strict; and use vars etc etc (lines #30 and #35) and add this:

require Modules::Compress::cgi_buffer;
import Compress::cgi_buffer
$cgi_buffer::generate_etag = 0;

immediately before your use strict; so that it looks like this:

require Modules::Compress::cgi_buffer;
import Compress::cgi_buffer
$cgi_buffer::generate_etag = 0;
use strict;
use Fcntl ':flock';
use UBBCGI qw(:cgi);
use UBBCGI::Carp qw(fatalsToBrowser set_message);

use vars qw(%etc etc


That should be all you need to do, tho you may want to clear cache... smile

[ 09-16-2001: Message edited by: AllenAyres ]
_________________________
- Allen wavey
- What Drives You?

Top
#146989 - 09/06/01 06:44 PM Re: [6.1x] UBB File Compression PB 2
Matt Jacob Offline
Master Hacker

Registered: 09/13/00
Posts: 4389
Loc: Tucson, Arizona
Runs so much faster over here. wink

Top
#146990 - 09/06/01 07:23 PM Re: [6.1x] UBB File Compression PB 2
qasic Offline
Developer

Registered: 01/01/01
Posts: 1930
Loc: Surrey, BC, Canada
Warning it requires Compress::Zlib which is not installed by default on most Perl-capable hosts.

q
_________________________

Top
#146991 - 09/06/01 07:44 PM Re: [6.1x] UBB File Compression PB 2
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
As stated in the article wink

All recent versions of activestate perl come with it... and if you are able to install this perl module on your server, you should be able to install the other required modules from cpan smile
_________________________
- Allen wavey
- What Drives You?

Top
#146992 - 09/07/01 01:41 AM Re: [6.1x] UBB File Compression PB 2
Lord Dexter Offline
Member

Registered: 05/25/01
Posts: 6503
Loc: Melbourne, Australia
Sounds like one good mod. I'll give it a try soon. wink

Top
#146993 - 09/07/01 01:55 AM Re: [6.1x] UBB File Compression PB 2
jordo Offline
Moderator / Developer

Registered: 08/05/00
Posts: 830
is this better than mod_gzip?
_________________________
jordo

Top
#146994 - 09/07/01 09:35 AM Re: [6.1x] UBB File Compression PB 2
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
I believe they both use Compress::Zlib - performance should be comparable. I have never checked out mod_gzip because it's written for apache and I've never used an apache server.

WiLD is doing some performance testing and said he would report back his results.

ISAPI compression on a windows server is supposed to perform better than both, but takes a little more work to set up for dynamic files. We're using it for the static files here.
_________________________
- Allen wavey
- What Drives You?

Top
#146995 - 09/07/01 01:39 PM Re: [6.1x] UBB File Compression PB 2
hmiguelito Offline
Member

Registered: 06/06/01
Posts: 102
Quote:
quote:


Allen, where can i find httpcomp.dll??

this link http://www.microsoft.com/TechNet/iis/httpcomp.asp gives me an 404 not found error frown
TIA smile

Top
#146996 - 09/07/01 01:41 PM Re: [6.1x] UBB File Compression PB 2
qasic Offline
Developer

Registered: 01/01/01
Posts: 1930
Loc: Surrey, BC, Canada
Theoretically, it'll be the same but mod_gzip allows more tweaking (in terms of compression); this module does not (if it uses Compress::Zlib's default gzip mechanism, compression is set at 4 iirc; 1 would be best for speed purposes and CPU load).

Anyways, if you already have mod_gzip on your server and it's compressing CGI output, don't bother to install this hack; it'll just waste CPU clicks.

q

[ September 07, 2001: Message edited by: qasic ]
_________________________

Top
#146997 - 09/07/01 02:13 PM Re: [6.1x] UBB File Compression PB 2
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Quote:
quote:


Here's some more info:

http://support.microsoft.com/support/kb/articles/Q255/9/51.ASP

http://www.microsoft.com/technet/treevie...ze/perflink.asp

Yes, if you've already installed some other form of compression, this would be redundant. It'd be like installing who's online twice smile
_________________________
- Allen wavey
- What Drives You?

Top
#146998 - 09/07/01 02:58 PM Re: [6.1x] UBB File Compression PB 2
hmiguelito Offline
Member

Registered: 06/06/01
Posts: 102
wow Allen this is awesome
w/o cgi_buffer.pm one thread with 2 replies generates ~17KB
with cgi_buffer.pm this same thread generates only ~3KB

thank you very much for this one Allen wink
rated laugh

Top
#146999 - 09/07/01 06:54 PM Re: [6.1x] UBB File Compression PB 2
Brett Offline
Moderator

Registered: 05/04/01
Posts: 992
Loc: Little Rock, AR
I really want to use this but each time i download cgi_buffer-0.3.tgz , it opens in winzip saying corrupt error.

Am i looking at the right download here? confused

Top
#147000 - 09/07/01 07:12 PM Re: [6.1x] UBB File Compression PB 2
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
I had the same problem... the download is trying to save it as a .tar file... be sure and save it as a .tgz file when you save it in the download. Winzip will then open it properly into a tar file and then unpack it after you've saved it to your computer.

Just a reminder this is for servers tht you are able to install perl modules on, either a dedicated server or a shared one a host doesn't mind installing perl modules for you.
_________________________
- Allen wavey
- What Drives You?

Top
#147001 - 09/07/01 11:24 PM Re: [6.1x] UBB File Compression PB 2
qasic Offline
Developer

Registered: 01/01/01
Posts: 1930
Loc: Surrey, BC, Canada
Actually, just rename the file so it ends in .tar.gz and you'll have no problems.

qasic
_________________________

Top
#147002 - 09/07/01 11:45 PM Re: [6.1x] UBB File Compression PB 2
Brett Offline
Moderator

Registered: 05/04/01
Posts: 992
Loc: Little Rock, AR
n/m problem fixed. Dang! Pretty fast!

[ September 07, 2001: Message edited by: raiyan ]

Top
#147003 - 09/08/01 01:09 AM Re: [6.1x] UBB File Compression PB 2
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
Code:
code:
Where can I get THIS file? tipsy
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#147004 - 09/08/01 01:31 AM Re: [6.1x] UBB File Compression PB 2
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
That's one of the modules mentioned that's required for using this. If you are using activestate perl, it's included. If not, I believe you can get all the modules from cpan.org
_________________________
- Allen wavey
- What Drives You?

Top
#147005 - 09/08/01 01:39 AM Re: [6.1x] UBB File Compression PB 2
LK Offline
Admin / Code Breaker

Registered: 03/24/01
Posts: 7396
I'm using ActiveState Perl and it's not included here tipsy

I got some versions from there, but they aren't IO::String (like Convertor::Ethiopian::String, Brute::String)
_________________________

My Hacks Page (will be back with UBB 7!)
UBBDev - We put the class into UBB.classic!

Top
#147006 - 09/08/01 02:12 AM Re: [6.1x] UBB File Compression PB 2
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Maybe it's only the most recent version... I am using 629. Did you also install the perl package manager (PPM)?

Some links:

http://aspn.activestate.com/ASPN/Reference/Products/ASPNTOC-ACTIVEPERL-004

http://aspn.activestate.com/ASPN/Reference/Products/ActivePerl/lib/IO.html

hmmm... maybe I have it loaded from something else... if you see where the difference is, can you report back here? You might need to get the module from cpan after all smile
_________________________
- Allen wavey
- What Drives You?

Top
#147007 - 09/08/01 05:10 AM Re: [6.1x] UBB File Compression PB 2
hmiguelito Offline
Member

Registered: 06/06/01
Posts: 102
hey LK
grab it here
http://www.cpan.org/modules/by-module/IO/IO-String-1.01.tar.gz

PS laugh ont forget to save it as .tgz

Top
Page 1 of 9 1 2 3 4 5 6 7 8 9 >



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks